using SG3L_RAG.Domain.Entities;

namespace SG3L_RAG.Application.Interfaces
{
    public interface IMessageService
    {
        Task<Message?> GetByIdAsync(Guid id);
        Task<IEnumerable<Message>> GetAllAsync();
        Task<Message> CreateAsync(Guid conversationId, string sender, string content, string reply, Guid? referencedDocId = null);
        Task UpdateAsync(Message message);
        Task DeleteAsync(Guid id);
        Task<IEnumerable<Message>> GetByConversationIdAsync(Guid conversationId);
        Task<IEnumerable<Message>> GetBySenderAsync(string sender);
        Task<IEnumerable<Message>> GetMessagesWithDocumentReferenceAsync(Guid documentId);
        Task<Message?> GetLatestMessageAsync(Guid conversationId);
        Task<IEnumerable<Message>> GetRecentMessagesAsync(Guid conversationId, int count = 50);
        Task UpdateReplyAsync(Guid messageId, string reply);
    }
}
